home *** CD-ROM | disk | FTP | other *** search
-
-
-
- BBBBAAAARRRRRRRRIIIIEEEERRRR((((3333PPPP)))) BBBBAAAARRRRRRRRIIIIEEEERRRR((((3333PPPP))))
-
-
-
- NNNNAAAAMMMMEEEE
- barrier, new_barrier, init_barrier, free_barrier - barrier functions
-
- CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<uuuulllloooocccckkkkssss....hhhh>>>>
-
- bbbbaaaarrrrrrrriiiieeeerrrr____tttt ****nnnneeeewwww____bbbbaaaarrrrrrrriiiieeeerrrr ((((uuuussssppppttttrrrr____tttt ****hhhhaaaannnnddddlllleeee))));;;;
-
- vvvvooooiiiidddd ffffrrrreeeeeeee____bbbbaaaarrrrrrrriiiieeeerrrr ((((bbbbaaaarrrrrrrriiiieeeerrrr____tttt ****bbbb))));;;;
-
- vvvvooooiiiidddd iiiinnnniiiitttt____bbbbaaaarrrrrrrriiiieeeerrrr ((((bbbbaaaarrrrrrrriiiieeeerrrr____tttt ****bbbb))));;;;
-
- vvvvooooiiiidddd bbbbaaaarrrrrrrriiiieeeerrrr ((((bbbbaaaarrrrrrrriiiieeeerrrr____tttt ****bbbb,,,, uuuunnnnssssiiiiggggnnnneeeedddd nnnn))));;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- These routines provide a simple rendezvous mechanism for shared address
- processes.
-
- _n_e_w__b_a_r_r_i_e_r takes a usptr_t as an argument to indicate the shared arena
- from which to allocate the barrier. The usptr_t is a previously
- allocated handle obtained through a call to _u_s_i_n_i_t(_3_P).
-
- The _b_a_r_r_i_e_r function takes a pointer to a previously allocated and
- initialized barrier structure (as returned by _n_e_w__b_a_r_r_i_e_r) and the number
- of processes/sub-tasks to wait for. As each process enters the barrier,
- it spins (busy wait) until all _n processes enter the barrier. At that
- time all are released and continue executing.
-
- _f_r_e_e__b_a_r_r_i_e_r releases all storage associated with _b.
-
- _i_n_i_t__b_a_r_r_i_e_r resets the barrier to its default state.
-
- _n_e_w__b_a_r_r_i_e_r will fail if one or more of the following are true:
-
- [ENOMEM] There is not enough space to allocate a barrier structure.
-
- [ENOMEM] It is not possible to allocate a lock.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- sproc(2), usinit(3P), ussetlock(3P), usunsetlock(3P), usnewlock(3P).
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- Upon successful completion, _n_e_w__b_a_r_r_i_e_r returns a pointer to a barrier
- struct. Otherwise, a value of 0 is returned to the calling process.
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-